package com.alex.core.domain;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 分页返回类
 * Created by xc on 2018/5/31.
 */
@Data
public class PageBase implements Serializable{
    private static final long serialVersionUID = -4843054288180603924L;

    /**
     * 总记录数
     */
    private Long total=0L;

    /**
     * 数据
     */
    private List records;

    public static  PageBase create(Long total,List records) {
        PageBase pageInfo = new PageBase();
        pageInfo.setTotal(total);
        pageInfo.setRecords(records);
        return pageInfo;
    }
}
